<template>
    <div>
        {{data}}
        <!--<cv-tree-node v-model="data" :data="node" c="tree-node default medium" checkable="all" :active="1"></cv-tree-node>-->
        <cv-tree v-model="data" :data="tree" c="tree default medium" checkable="leaf" :active="3"></cv-tree>
    </div>
</template>

<script>
    export default {
        name: "TestTree",
        data() {
            return {
                data: [1, 11, 111, 12],
                node: {
                    text: "一级1",
                    value: 1,
                    children: [{
                        text: "二级1-1",
                        value: 11,
                        children: [{
                            text: "三级1-1-1",
                            value: 111
                        }, {
                            text: "三级1-1-2",
                            value: 112
                        }]
                    }]
                },
                tree: [{
                    id: 1,
                    label: "一级1",
                    children: [{
                        id: 11,
                        label: "二级1-1",
                        children: [{
                            id: 111,
                            label: "三级1-1-1"
                        }, {
                            id: 112,
                            label: "三级1-1-2"
                        }]
                    }, {
                        id: 12,
                        label: "二级1-2",
                        children: [{
                            id: 121,
                            label: "三级1-2-1"
                        }, {
                            id: 122,
                            label: "三级1-2-2"
                        }]
                    }]
                }, {
                    id: 2,
                    label: "一级2",
                    children: [{
                        id: 21,
                        label: "二级2-1"
                    }]
                }]
            };
        }
    }
</script>

<style>
</style>
